#!./perl

# ------------------------------------------------------------

# killdev.pl, by Jean-Pierre Girard (jpg@cdware.eng.sun.com)
# This allows to kill a sound before loading a new html page

# ------------------------------------------------------------

# Bugs and other fixes

# ------------------------------------------------------------


##############################################################################
# MAIN PART: Decode the parameters and calls the correct subfunctions
##############################################################################

if (-r "/tmp/httpd/sound.pid") {
	system("kill -9 `cat /tmp/httpd/sound.pid`");
}
$request = $ENV{'QUERY_STRING'};
if ($request =~ /slow/) {
	$~ = HEADER;
	write;

    print "<applet code=delay.class width=1 height=1>";
    print "<param name=del value=\"1000\">";
    print "<param name=href value=\"http://localhost:7999/SunSolutions/index4c.html\"></applet>\n";
} else {
	$~ = HEADER;
	write;

    print "<applet code=delay.class width=1 height=1>";
    print "<param name=del value=\"1000\">";
    print "<param name=href value=\"http://localhost:7999/SunSolutions/index4x.html\"></applet>\n";
}
###############################################
format HEADER =
Content-type: text/html


<title>Sun Solutions CD Welcome Page</title></head>
<body bgcolor=#ffffff>
<p>
<H1><center>
 &nbsp<p>
 &nbsp<p>
 &nbsp<p>
 &nbsp<p>
 <p>
 <p>
 <p>
<p>
<font color=#0000ff>Welcome to the Sun Solutions CD.</font>
 &nbsp<p>
 &nbsp<p>
 &nbsp<p>
 &nbsp<p>
<p><h5><font color=#0000ff>Copyright</font> 1996 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA 94043 USA.  All rights reserved.</h5>
 &nbsp<p>
<p><h5>Note: If running as super-user, consult the booklet for instructions.</h5><br>
</center>
</h1>
</body>
</html>
.
#print "Content-type: text/html\n\n<HTML><HEAD><TITLE>KillSound script</TITLE>";

#foreach $en (sort keys(%ENV)) {
	#print "$en = $ENV{$en}<br>\n";
#}

#print("kill -9 `cat /tmp/devcd/sound.pid`");
# print "<param name=img value=\"file:///tmp/httpd/.products/$disc_name/images/goto_home.gif\">";
